Otherwise, may encounter deadlock.
Signed-off-by: Wei Gang <gang.wei@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
s_time_t now, next_event;
int cpu;
- spin_lock(&ch->lock);
+ spin_lock_irq(&ch->lock);
again:
ch->next_event = STIME_MAX;
if ( reprogram_hpet_evt_channel(ch, next_event, now, 0) )
goto again;
}
- spin_unlock(&ch->lock);
+ spin_unlock_irq(&ch->lock);
}
void hpet_broadcast_init(void)
{
struct hpet_event_channel *ch = &hpet_event;
+ ASSERT(!local_irq_is_enabled());
spin_lock(&ch->lock);
disable_APIC_timer();